Skip to content

gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async#110500

Merged
ambv merged 1 commit into
python:mainfrom
serhiy-storchaka:test_async_gen_propagates_generator_exit
Oct 10, 2023
Merged

gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async#110500
ambv merged 1 commit into
python:mainfrom
serhiy-storchaka:test_async_gen_propagates_generator_exit

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 7, 2023

Copy link
Copy Markdown
Member

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.

…_contextlib_async

It now fails if the original bug is not fixed, and no longer produce
ResourceWarning with fixed code.
@ambv

ambv commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

After 6780d63 there are no RuntimeWarnings visible on Ubuntu and macOS so I had to revert that to confirm this PR is indeed solving the core issue.

Without the change:

/Volumes/RAMDisk/cpython/Lib/contextlib.py:701: RuntimeWarning: coroutine method 'aclose' of 'TestAbstractAsyncContextManager.test_async_gen_propagates_generator_exit.<locals>.gen' was never awaited
  async def __aenter__(self):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

This warning doesn't appear after the change.

@ambv ambv merged commit 5aa62a8 into python:main Oct 10, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 10, 2023
…_contextlib_async (pythonGH-110500)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Oct 10, 2023

Copy link
Copy Markdown

GH-110610 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Oct 10, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 10, 2023
…_contextlib_async (pythonGH-110500)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Oct 10, 2023

Copy link
Copy Markdown

GH-110611 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Oct 10, 2023
ambv pushed a commit that referenced this pull request Oct 10, 2023
…t_contextlib_async (GH-110500) (#110610)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
ambv pushed a commit that referenced this pull request Oct 10, 2023
…t_contextlib_async (GH-110500) (#110611)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…_contextlib_async (python#110500)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
@serhiy-storchaka serhiy-storchaka deleted the test_async_gen_propagates_generator_exit branch July 1, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants